package org.henau.EmergencyHandlerChain;

// 5. 具体处理器 - 紧急停止处理 (EmergencyStopHandler.java)
public class EmergencyStopHandler extends EmergencyHandler {
    @Override
    protected boolean canHandle(EmergencyEvent event) {
        return event.getType() == EmergencyType.EMERGENCY_STOP;
    }

    @Override
    protected void processEvent(EmergencyEvent event) {
        System.out.println("[急停处理] 处理事件: " + event.getCode());
        System.out.println("   → 切断动力系统");
        System.out.println("   → 启动液压制动");
        System.out.println("   → 发送警报信号");
        event.setResolved(true);
    }
}